<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        <p>调用时间的方法：{{currentTime1()}}</p>
        <p>调用时间的计算属性:{{currentTime2}}</p>
    </div>

<script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.js">
</script>
<script>
    var vm = new Vue({
        el: "#app",
        data:{
            message:"Hello vue"
        },
        methods: {
            currentTime1:function (){
                return Date.now();
            }
        },
        computed:{
            currentTime2:function (){
                //this.message;
                return Date.now();
            }
        }

    });
</script>
</body>
</html>